﻿package ygg.encoding.swf.abc.structure
{
	public class TraitInfo
	{
		public var name:*;
		public var init:MethodInfo;
		public var itraits:TraitInfo; //only through decode classes
		public var base:*;
		public var flags:int;
		
		public var protectedNs:Namespace; //only through decode instances
		
		public const interfaces:Array = []; //only through decode instances
		
		public const names:Object = { }; //ref to member by name
		public const slots:Array = [];  //TraitKind.SLOT, TraitKind.CONST,TraitKind.CLASS:
		public const methods:Array = []; //TraitKind.METHOD, TraitKind.GETTER, TraitKind.SETTER:
		public const members:Array = []; //includes all kinds
		
		public function toString():String
		{
			return String(name);
		}
		/*
		public function dump(abc:Abc, indent:String, attr:String=""):void
		{
			for each (var m:* in members)
			{
				m.dump(abc, indent, attr);
			}
		}*/
	}

}